package com.jiazhong.shixi.mapper;

import com.jiazhong.shixi.bean.Bingren;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BingrenMapper {
    //病人录入信息
    @Select({"insert into bingren values (null,#{binXingming},#{binXingbie},#{binShenfenzheng},#{binNianling},#{binShoujihao},'未就诊',#{binKeshi})"})
    Bingren add(Bingren bingren);
    //返回科室位置
    @Select("select kesWeizhi from keshi where kesMingcheng=(select binKeshi from bingren where binShenfenzheng=#{sfz})")
    List<Bingren> fanhui(long sfz);
}
